package com.si.sea_island.mapper;


import com.si.sea_island.pojo.sms.SmsDB;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Component
public interface SmsDBMapper {
    @Select("select * from si_sms where phone=#{phone}")
    SmsDB getSmsByPhone(String phone);

    @Insert("INSERT INTO si_sms(phone,code,time) VALUES(#{phone},#{code},#{time})")
    int insertSmsDB(SmsDB smsDB);

    @Update("update si_sms set code = #{code},time = #{time} where phone = #{phone}")
    int updateSmsDB(SmsDB smsDB);
}
